<?
/**
 * Category database object
 */
class Category extends CategoryDbo {

/**
 * constructer
 */
public function __construct() {
	parent::__construct();
	}

/**
 * Getters
 */
public function Color() {
	return $this->getProperty('Color');
	}
public function Desc() {
	return $this->getProperty('Desc');
	}
public function Id() {
	return $this->getProperty('Id');
	}
public function Tag() {
	return $this->getProperty('Tag');
	}

/**
 * Can the currently populated item be deleted?
 * @return bool
 */
public function canDelete() {
	return ($this->populated);
	}

/**
 * Delete currently populated object, taking care of linked objects first.
 * @return bool true on success
 * @return string error message on failures.
 */
public function delete() {
	if (!$this->canDelete()) {
		return 'Item cannot be deleted at this time.';
		}
	return parent::delete();
	}

/**
 * Obtain standardized object list.
 * @return array
 */
public function getList() {
	$this->searchReset();
	$this->setSearchSelect('Id');
	$this->setSearchSelect('Color');
	$this->setSearchSelect('Desc');
	$this->setSearchSelect('Tag');
	$this->setSearchOrder('Tag');
	return $this->query();
	}

}
?>
